simple sieve 2 SB.txt rev for SB.exe 2018-09-14 adopted from:
'Simple sieve 2.bas SmallBASIC 2015-04-29 found a faster sieve with BASIC 256
n topLimit 100
n limit topLimit ^ .5
. Primes to topLimit
take care of even numbers first
n index 4
[
	> composites index 1
	n index index + 2
	i index > topLimit
		x
	f
]
now do odd numbers
n index 3
[
	< test composites index
	i test = 0
		i index < limit
			n j 2 * index
			[
				> composites j 1
				n j j + index
				i j > topLimit
					x
				f
			]
		f
	f
	n index index + 2
	i index > limit 
		x
	f
]
n index 2
pCount = 0
[
	< test composites index
	i test = 0 
		n pCount pCount + 1
		, index
	f	
	n index index +1
	i index > topLimit
		x
	f
]
.
. There are pCount primes for the first topLimit integers.
